<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CMSIS-DAP: CMSIS-DAP Debug Unit Information</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-DAP
   &#160;<span id="projectnumber">Version 0.01 - Beta</span>
   </div>
   <div id="projectbrief">Interface Firmware for CoreSight Debug Access Port</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <li class="current"><a href="../../DAP/html/index.html"><span>DAP</span></a></li>
    </ul>
</div>
<!-- Generated by Doxygen 1.8.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group___d_a_p___config___debug__gr.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a>  </div>
  <div class="headertitle">
<div class="title">CMSIS-DAP Debug Unit Information</div>  </div>
<div class="ingroups"><a class="el" href="group___d_a_p___config_i_o__gr.html">Configure I/O Ports and Debug Unit</a></div></div><!--header-->
<div class="contents">
<hr/><a name="details" id="details"></a><h2>Description</h2>
<p>Provides definitions about: </p>
<ul>
<li>Definition of Cortex-M processor parameters used in CMSIS-DAP Debug Unit.</li>
<li>Debug Unit communication packet size.</li>
<li>Debug Access Port communication mode (JTAG or SWD).</li>
<li>Optional information about a connected Target Device (for Evaluation Boards). </li>
</ul>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga512016e5f1966a8fd45b3f1a81ba5b8f"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#ga512016e5f1966a8fd45b3f1a81ba5b8f">CPU_CLOCK</a>&#160;&#160;&#160;100000000</td></tr>
<tr class="memdesc:ga512016e5f1966a8fd45b3f1a81ba5b8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Processor Clock of the Cortex-M MCU used in the Debug Unit. This value is used to calculate the SWD/JTAG clock speed.  <a href="#ga512016e5f1966a8fd45b3f1a81ba5b8f"></a><br/></td></tr>
<tr class="memitem:ga119c70409a24e3a8bb35df07dffeb8c8"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#ga119c70409a24e3a8bb35df07dffeb8c8">IO_PORT_WRITE_CYCLES</a>&#160;&#160;&#160;2</td></tr>
<tr class="memdesc:ga119c70409a24e3a8bb35df07dffeb8c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of processor cycles for I/O Port write operations. This value is used to calculate the SWD/JTAG clock speed that is generated with I/O Port write operations in the Debug Unit by a Cortex-M MCU. Most Cortex-M processors requrie 2 processor cycles for a I/O Port Write operation. If the Debug Unit uses a Cortex-M0+ processor with high-speed peripheral I/O only 1 processor cycle might be requrired.  <a href="#ga119c70409a24e3a8bb35df07dffeb8c8"></a><br/></td></tr>
<tr class="memitem:gaf886ab35e52d1ff2935351817786c8af"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#gaf886ab35e52d1ff2935351817786c8af">DAP_SWD</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:gaf886ab35e52d1ff2935351817786c8af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate that Serial Wire Debug (SWD) communication mode is available at the Debug Access Port. This information is returned by the command <a class="el" href="group___d_a_p___info.html">DAP_Info</a> as part of <b>Capabilities</b>.  <a href="#gaf886ab35e52d1ff2935351817786c8af"></a><br/></td></tr>
<tr class="memitem:ga3bbd310146b348db48a842ee804a0adf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#ga3bbd310146b348db48a842ee804a0adf">DAP_JTAG</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:ga3bbd310146b348db48a842ee804a0adf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indicate that JTAG communication mode is available at the Debug Port. This information is returned by the command <a class="el" href="group___d_a_p___info.html">DAP_Info</a> as part of <b>Capabilities</b>.  <a href="#ga3bbd310146b348db48a842ee804a0adf"></a><br/></td></tr>
<tr class="memitem:gab29200a0988c7d1454f63661a8450dbf"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#gab29200a0988c7d1454f63661a8450dbf">DAP_JTAG_DEV_CNT</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:gab29200a0988c7d1454f63661a8450dbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure maximum number of JTAG devices on the scan chain connected to the Debug Access Port. This setting impacts the RAM requirements of the Debug Unit. Valid range is 1 .. 255.  <a href="#gab29200a0988c7d1454f63661a8450dbf"></a><br/></td></tr>
<tr class="memitem:ga89462514881c12c1508395050ce160eb"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#ga89462514881c12c1508395050ce160eb">DAP_DEFAULT_PORT</a>&#160;&#160;&#160;1</td></tr>
<tr class="memdesc:ga89462514881c12c1508395050ce160eb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default communication mode on the Debug Access Port. Used for the command <a class="el" href="group___d_a_p___connect.html">DAP_Connect</a> when Port Default mode is selected.  <a href="#ga89462514881c12c1508395050ce160eb"></a><br/></td></tr>
<tr class="memitem:gab52710df89c3e3c19de577c638f954ea"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#gab52710df89c3e3c19de577c638f954ea">DAP_DEFAULT_SWJ_CLOCK</a>&#160;&#160;&#160;1000000</td></tr>
<tr class="memdesc:gab52710df89c3e3c19de577c638f954ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default communication speed on the Debug Access Port for SWD and JTAG mode. Used to initialize the default SWD/JTAG clock frequency. The command <a class="el" href="group___d_a_p___s_w_j___clock.html">DAP_SWJ_Clock</a> can be used to overwrite this default setting.  <a href="#gab52710df89c3e3c19de577c638f954ea"></a><br/></td></tr>
<tr class="memitem:gaa28bb1da2661291634c4a8fb3e227404"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#gaa28bb1da2661291634c4a8fb3e227404">DAP_PACKET_SIZE</a>&#160;&#160;&#160;64</td></tr>
<tr class="memdesc:gaa28bb1da2661291634c4a8fb3e227404"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum Package Size for Command and Response data. This configuration settings is used to optimized the communication performance with the debugger and depends on the USB peripheral. Change setting to 1024 for High-Speed USB.  <a href="#gaa28bb1da2661291634c4a8fb3e227404"></a><br/></td></tr>
<tr class="memitem:ga03ed6a5aae34f4379ea97435122f83dd"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#ga03ed6a5aae34f4379ea97435122f83dd">DAP_PACKET_COUNT</a>&#160;&#160;&#160;64</td></tr>
<tr class="memdesc:ga03ed6a5aae34f4379ea97435122f83dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum Package Buffers for Command and Response data. This configuration settings is used to optimized the communication performance with the debugger and depends on the USB peripheral. For devices with limited RAM or USB buffer the setting can be reduced (valid range is 1 .. 255). Change setting to 4 for High-Speed USB.  <a href="#ga03ed6a5aae34f4379ea97435122f83dd"></a><br/></td></tr>
<tr class="memitem:ga792651aa4035a7ad712c6bb201db8a6a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___d_a_p___config___debug__gr.html#ga792651aa4035a7ad712c6bb201db8a6a">TARGET_DEVICE_FIXED</a>&#160;&#160;&#160;0</td></tr>
<tr class="memdesc:ga792651aa4035a7ad712c6bb201db8a6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug Unit is connected to fixed Target Device. The Debug Unit may be part of an evaluation board and always connected to a fixed known device. In this case a Device Vendor and Device Name string is stored which may be used by the debugger or IDE to configure device parameters.  <a href="#ga792651aa4035a7ad712c6bb201db8a6a"></a><br/></td></tr>
</table>
<hr/><h2>Macro Definition Documentation</h2>
<a class="anchor" id="ga512016e5f1966a8fd45b3f1a81ba5b8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CPU_CLOCK&#160;&#160;&#160;100000000</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Processor Clock of the Cortex-M MCU used in the Debug Unit. This value is used to calculate the SWD/JTAG clock speed. </p>
<p>Specifies the CPU Clock in Hz </p>

</div>
</div>
<a class="anchor" id="ga89462514881c12c1508395050ce160eb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_DEFAULT_PORT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default communication mode on the Debug Access Port. Used for the command <a class="el" href="group___d_a_p___connect.html">DAP_Connect</a> when Port Default mode is selected. </p>
<p>Default JTAG/SWJ Port Mode: 1 = SWD, 2 = JTAG. </p>

</div>
</div>
<a class="anchor" id="gab52710df89c3e3c19de577c638f954ea"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_DEFAULT_SWJ_CLOCK&#160;&#160;&#160;1000000</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default communication speed on the Debug Access Port for SWD and JTAG mode. Used to initialize the default SWD/JTAG clock frequency. The command <a class="el" href="group___d_a_p___s_w_j___clock.html">DAP_SWJ_Clock</a> can be used to overwrite this default setting. </p>
<p>Default SWD/JTAG clock frequency in Hz. </p>

</div>
</div>
<a class="anchor" id="ga3bbd310146b348db48a842ee804a0adf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_JTAG&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Indicate that JTAG communication mode is available at the Debug Port. This information is returned by the command <a class="el" href="group___d_a_p___info.html">DAP_Info</a> as part of <b>Capabilities</b>. </p>
<p>JTAG Mode: 1 = available, 0 = not available. </p>

</div>
</div>
<a class="anchor" id="gab29200a0988c7d1454f63661a8450dbf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_JTAG_DEV_CNT&#160;&#160;&#160;8</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure maximum number of JTAG devices on the scan chain connected to the Debug Access Port. This setting impacts the RAM requirements of the Debug Unit. Valid range is 1 .. 255. </p>
<p>Maximum number of JTAG devices on scan chain </p>

</div>
</div>
<a class="anchor" id="ga03ed6a5aae34f4379ea97435122f83dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_PACKET_COUNT&#160;&#160;&#160;64</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Maximum Package Buffers for Command and Response data. This configuration settings is used to optimized the communication performance with the debugger and depends on the USB peripheral. For devices with limited RAM or USB buffer the setting can be reduced (valid range is 1 .. 255). Change setting to 4 for High-Speed USB. </p>
<p>Buffers: 64 = Full-Speed, 4 = High-Speed. </p>

</div>
</div>
<a class="anchor" id="gaa28bb1da2661291634c4a8fb3e227404"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_PACKET_SIZE&#160;&#160;&#160;64</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Maximum Package Size for Command and Response data. This configuration settings is used to optimized the communication performance with the debugger and depends on the USB peripheral. Change setting to 1024 for High-Speed USB. </p>
<p>USB: 64 = Full-Speed, 1024 = High-Speed. </p>

</div>
</div>
<a class="anchor" id="gaf886ab35e52d1ff2935351817786c8af"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DAP_SWD&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Indicate that Serial Wire Debug (SWD) communication mode is available at the Debug Access Port. This information is returned by the command <a class="el" href="group___d_a_p___info.html">DAP_Info</a> as part of <b>Capabilities</b>. </p>
<p>SWD Mode: 1 = available, 0 = not available </p>

</div>
</div>
<a class="anchor" id="ga119c70409a24e3a8bb35df07dffeb8c8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_PORT_WRITE_CYCLES&#160;&#160;&#160;2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Number of processor cycles for I/O Port write operations. This value is used to calculate the SWD/JTAG clock speed that is generated with I/O Port write operations in the Debug Unit by a Cortex-M MCU. Most Cortex-M processors requrie 2 processor cycles for a I/O Port Write operation. If the Debug Unit uses a Cortex-M0+ processor with high-speed peripheral I/O only 1 processor cycle might be requrired. </p>
<p>I/O Cycles: 2=default, 1=Cortex-M0+ fast I/0 </p>

</div>
</div>
<a class="anchor" id="ga792651aa4035a7ad712c6bb201db8a6a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TARGET_DEVICE_FIXED&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Debug Unit is connected to fixed Target Device. The Debug Unit may be part of an evaluation board and always connected to a fixed known device. In this case a Device Vendor and Device Name string is stored which may be used by the debugger or IDE to configure device parameters. </p>
<p>Target Device: 1 = known, 0 = unknown; </p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Wed Jun 6 2012 13:44:58 for CMSIS-DAP by ARM Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.1 
	-->
	</li>
  </ul>
</div>
</body>
</html>
